#!/bin/bash

echo -n "Enter two numbers:"
read x y
((z=x+y))
if [[ z -gt 10 ]]; then 
	echo "x+y>10"
fi
((x*=y))
((z%=5))
if [[ x -le 100 || z -ne 0 ]]; then
	echo "(x*y)<=100or(x+y)%5!=0"
fi
echo "Your current directory is `pwd`"
echo "Enter a filename ->\c" # echo "...\c" equals to "echo -n '...'"
read name
if [[ -r $name && -f $name ]]; then
	cat $name
elif [[ -d $name && -x $name ]]; then
		cd $name
		ls -l | wc -l
else
	echo "Bad file name."
fi